using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ZPLARay7Controller : MonoBehaviour
{
    // Start is called before the first frame update
    private float defaultScale;
    private float scale;
    void Start()
    {
        defaultScale = transform.localScale.x;
        InvokeRepeating("ResetTransparent", 0.03f, 0.03f);
        InvokeRepeating("Transparent", 0.01f, 0.03f);
    }

    private void Update()
    {
        transform.localScale = new Vector3(scale, transform.localScale.y, transform.localScale.z);

    }

    public void ResetTransparent()
    {
        scale = defaultScale;
    }

    public void Transparent()
    {
        scale = 0;
    }
}
